package com.imooc.sell.VO.tian.fore;

import java.util.List;

/**
 * @ClassName ResultUtil
 * @Description 前端返回结果封装
 * @Author tianli
 * @Date 2018/8/12
 **/
public class ProductResultUtil {

    public static ProductResultVo success(List<CategoryList> list) {
        ProductResultVo productResultVo = new ProductResultVo();
        productResultVo.setCategoryList(list);
        productResultVo.setMcode(1);
        productResultVo.setMsg("成功");
        return productResultVo;
    }

    public static ProductResultVo success() {
        return null;
    }

    public static ProductResultVo error(Integer code, String msg) {
        ProductResultVo productResultVo = new ProductResultVo();
        productResultVo.setMsg(msg);
        productResultVo.setMcode(code);
        return productResultVo;
    }

}
